<template>
  <div>
    <div style="font-size: 16px; margin-top:-15px" v-if="list.length">
      <p style="margin: 0">设备型号名称：{{ list[0].deviceName }}</p>
      <p style="margin: 10px 0 20px">设备编码：{{ list[0].deviceCode }}</p>
    </div>
    <el-table
      :data="list"
      max-height="600px"
    >
      <el-table-column label="模块编码" align="center" prop="modelCode" width="190"/>
      <el-table-column label="模块名称" align="center" prop="modelName"/>
      <el-table-column label="模块状态" align="center" prop="modelStatus">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.common_status" :value="scope.row.modelStatus"/>
        </template>
      </el-table-column>
      <el-table-column label="驱动名称" align="center" prop="driveName"/>
      <el-table-column label="插件库名称" align="center" prop="adapterName"/>
      <el-table-column label="当前插件库版本" align="center" prop="adapterVersion"/>
      <el-table-column label="异常信息" align="center" prop="message"/>
      <el-table-column label="异常代码" align="center" prop="errorCode"/>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "modelInfo",
  dicts: ['common_status'],
  props: {
    // 模块列表
    list: {
      type: Array,
      default() {
        return []
      }
    },
    // 设备状态字典列表
    deviceStatusDictList: {
      type: Array,
      default() {
        return []
      }
    },
  },
}
</script>
